<html>
<head><meta charset="utf-8"><title>moving method matching to a canonical query · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html">moving method matching to a canonical query</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="156887246"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156887246" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156887246">(Jan 25 2019 at 21:40)</a>:</h4>
<p>hi <span class="user-mention" data-user-id="116009">@nikomatsakis</span></p>



<a name="156887257"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156887257" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156887257">(Jan 25 2019 at 21:40)</a>:</h4>
<p>so about moving method matching to a canonical query</p>



<a name="156887267"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156887267" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156887267">(Jan 25 2019 at 21:41)</a>:</h4>
<p>I think the main problem with doing it "directly" is that method matching has a lot of inputs</p>



<a name="156887275"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156887275" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156887275">(Jan 25 2019 at 21:41)</a>:</h4>
<p>things like the privacy of methods</p>



<a name="156887284"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156887284" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156887284">(Jan 25 2019 at 21:41)</a>:</h4>
<p>but it might be possible to do it "indirectly"</p>



<a name="156887292"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156887292" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156887292">(Jan 25 2019 at 21:41)</a>:</h4>
<p>where there's a query that returns the set of matching methods</p>



<a name="156887298"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156887298" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156887298">(Jan 25 2019 at 21:41)</a>:</h4>
<p>and their priorities</p>



<a name="156887338"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156887338" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156887338">(Jan 25 2019 at 21:42)</a>:</h4>
<blockquote>
<p>I think the main problem with doing it "directly" is that method matching has a lot of inputs</p>
</blockquote>
<p>(Do you just mean there'd be a lot of data in the query key?)</p>



<a name="156887351"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156887351" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156887351">(Jan 25 2019 at 21:42)</a>:</h4>
<p>the problem is that privacy is based on a NodeId</p>



<a name="156887358"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156887358" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156887358">(Jan 25 2019 at 21:42)</a>:</h4>
<p>so if we do it directly, we really won't be having any deduplication</p>



<a name="156887368"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156887368" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156887368">(Jan 25 2019 at 21:42)</a>:</h4>
<p>well, only within a module</p>



<a name="156887375"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156887375" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156887375">(Jan 25 2019 at 21:43)</a>:</h4>
<p>consider hygiene</p>



<a name="156887376"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156887376" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156887376">(Jan 25 2019 at 21:43)</a>:</h4>
<p>(i.e., there is presumably some "canonicalization" we can do to the node-id)</p>



<a name="156887387"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156887387" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156887387">(Jan 25 2019 at 21:43)</a>:</h4>
<p>it makes this sort of thing so much more fun</p>



<a name="156887394"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156887394" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156887394">(Jan 25 2019 at 21:43)</a>:</h4>
<p>I'm not really convinced anymore that "type-related" lookups should work via hygiene</p>



<a name="156887396"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156887396" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156887396">(Jan 25 2019 at 21:43)</a>:</h4>
<p>but that's a separate matter</p>



<a name="156887399"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156887399" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156887399">(Jan 25 2019 at 21:43)</a>:</h4>
<p>sure me too</p>



<a name="156887404"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156887404" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156887404">(Jan 25 2019 at 21:43)</a>:</h4>
<p>but that's what @jseyfried implemented back in the day</p>



<a name="156887405"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156887405" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156887405">(Jan 25 2019 at 21:43)</a>:</h4>
<p><em>regardless</em> I agree that your idea is good</p>



<a name="156887410"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156887410" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156887410">(Jan 25 2019 at 21:43)</a>:</h4>
<p>if we can make it work</p>



<a name="156887412"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156887412" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156887412">(Jan 25 2019 at 21:43)</a>:</h4>
<p>which one, the PR</p>



<a name="156887418"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156887418" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156887418">(Jan 25 2019 at 21:43)</a>:</h4>
<p>no, I haven't read the PR yet</p>



<a name="156887421"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156887421" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156887421">(Jan 25 2019 at 21:43)</a>:</h4>
<p>or having a "table ignoring privacy"</p>



<a name="156887468"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156887468" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156887468">(Jan 25 2019 at 21:44)</a>:</h4>
<p>I mean that if we could do method lookups that can ignore privacy and return enough results to "customize" to each site</p>



<a name="156887475"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156887475" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156887475">(Jan 25 2019 at 21:44)</a>:</h4>
<p>that seems like it could result in a lot more re-use</p>



<a name="156887488"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156887488" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156887488">(Jan 25 2019 at 21:44)</a>:</h4>
<p>anyway I should read your PR</p>



<a name="156887506"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156887506" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156887506">(Jan 25 2019 at 21:44)</a>:</h4>
<p>actually, it's [WIP] because I might be rewriting it</p>



<a name="156887662"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156887662" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156887662">(Jan 25 2019 at 21:47)</a>:</h4>
<p>but I wanted to see whether my approach to composing canonicalization is OK</p>



<a name="156887668"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156887668" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156887668">(Jan 25 2019 at 21:47)</a>:</h4>
<p>i.e. <a href="https://github.com/rust-lang/rust/pull/57885/files#diff-dd3531c645441fc4588d997838e391f5R813" target="_blank" title="https://github.com/rust-lang/rust/pull/57885/files#diff-dd3531c645441fc4588d997838e391f5R813">https://github.com/rust-lang/rust/pull/57885/files#diff-dd3531c645441fc4588d997838e391f5R813</a></p>



<a name="156888226"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156888226" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156888226">(Jan 25 2019 at 21:57)</a>:</h4>
<p>and I think I'm saved by ObjectCandidate being weird</p>



<a name="156888326"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156888326" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156888326">(Jan 25 2019 at 21:58)</a>:</h4>
<p>I'm not sure I quite get what is being composed</p>



<a name="156888336"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156888336" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156888336">(Jan 25 2019 at 21:59)</a>:</h4>
<p>you instantiate the canonical self-ty with variables</p>



<a name="156888358"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156888358" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156888358">(Jan 25 2019 at 21:59)</a>:</h4>
<p>then invoke <code>canonicalize_response</code> on the new struct which seems to be largely built from the result of that, right?</p>



<a name="156888442"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156888442" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156888442">(Jan 25 2019 at 22:00)</a>:</h4>
<p>I guess I don't see anything that stands out as wrong to me</p>



<a name="156888455"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156888455" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156888455">(Jan 25 2019 at 22:00)</a>:</h4>
<p>but I feel like maybe I'm missing something because I'm not quite sure what you are concerned about</p>



<a name="156888510"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156888510" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156888510">(Jan 25 2019 at 22:01)</a>:</h4>
<p>yea</p>



<a name="156888528"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156888528" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156888528">(Jan 25 2019 at 22:01)</a>:</h4>
<p>So I start with a Canonical&lt;QueryResult&lt;T&gt;&gt;</p>



<a name="156888532"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156888532" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156888532">(Jan 25 2019 at 22:01)</a>:</h4>
<p>and I first open the canonical</p>



<a name="156888536"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156888536" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156888536">(Jan 25 2019 at 22:01)</a>:</h4>
<p>then I "map" the QueryResult</p>



<a name="156888540"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156888540" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156888540">(Jan 25 2019 at 22:01)</a>:</h4>
<p>then I canonicalize it again</p>



<a name="156888604"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156888604" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156888604">(Jan 25 2019 at 22:02)</a>:</h4>
<p>the "weird" thing here is that I'm splitting the Canonical &amp; the QueryResult</p>



<a name="156888616"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156888616" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156888616">(Jan 25 2019 at 22:02)</a>:</h4>
<p>where most methods treat Canonical&lt;QueryResult&lt;-&gt;&gt; as a single unit</p>



<a name="156888629"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156888629" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156888629">(Jan 25 2019 at 22:02)</a>:</h4>
<p>but I suppose that's just the thing that is OK</p>



<a name="156888666"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156888666" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156888666">(Jan 25 2019 at 22:03)</a>:</h4>
<p>and now I'm trying to investigate whether it's possible to have an ObjectCandidate be sensitive to just the def-id of the trait object</p>



<a name="156888671"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156888671" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156888671">(Jan 25 2019 at 22:03)</a>:</h4>
<p>while ignoring its substs</p>



<a name="156888676"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156888676" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156888676">(Jan 25 2019 at 22:03)</a>:</h4>
<p>and then I'll have to do none of this canonicalization business</p>



<a name="156888725"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156888725" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156888725">(Jan 25 2019 at 22:04)</a>:</h4>
<p>but this seems subtle</p>



<a name="156888732"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156888732" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156888732">(Jan 25 2019 at 22:04)</a>:</h4>
<p>and I'm trying to work it out</p>



<a name="156888960"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156888960" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156888960">(Jan 25 2019 at 22:07)</a>:</h4>
<p>ok. I don't see an obvious problem but I will try to give it a bit more concentrated time</p>



<a name="156888963"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156888963" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156888963">(Jan 25 2019 at 22:07)</a>:</h4>
<p>let me add something to my calendar :)</p>



<a name="156888971"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156888971" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156888971">(Jan 25 2019 at 22:07)</a>:</h4>
<p>I'd like to read it more closely anyway</p>



<a name="156888992"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156888992" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156888992">(Jan 25 2019 at 22:08)</a>:</h4>
<p>you mean my PR?</p>



<a name="156889052"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156889052" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156889052">(Jan 25 2019 at 22:08)</a>:</h4>
<p>Yes. I won't really have time to look closely until Monday anyway</p>



<a name="156889055"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156889055" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156889055">(Jan 25 2019 at 22:08)</a>:</h4>
<p>I think there's some subtle problem with <code>arbitrary_self_types</code> that could cause the simpler approach to ICE</p>



<a name="156889059"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156889059" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156889059">(Jan 25 2019 at 22:08)</a>:</h4>
<p>ok</p>



<a name="156889090"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/156889090" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#156889090">(Jan 25 2019 at 22:08)</a>:</h4>
<p>which means we need to do this approach instead of the simpler one</p>



<a name="157061017"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/157061017" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#157061017">(Jan 28 2019 at 21:53)</a>:</h4>
<p>wait, in the universes world, does <code>dyn for&lt;'a&gt; Foo&lt;'a, Output=&amp;'a $0&gt;</code> unify with <code>dyn Foo&lt;'$0, Output=$1&gt;</code>?</p>



<a name="157061025"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/157061025" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#157061025">(Jan 28 2019 at 21:54)</a>:</h4>
<p>I mean, in a probe context? <span class="user-mention" data-user-id="116009">@nikomatsakis</span></p>



<a name="157062305"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/157062305" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#157062305">(Jan 28 2019 at 22:14)</a>:</h4>
<p>and now I found a stupid simple way of cutting away that gordian know</p>



<a name="157120964"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/157120964" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#157120964">(Jan 29 2019 at 17:21)</a>:</h4>
<p><span class="user-mention" data-user-id="126804">@Ariel Ben-Yehuda</span> presently, they do unify but should generate an error later in region solving. I think that for trait solving at least we may have to get a bit smarter, though.</p>



<a name="157135024"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/moving%20method%20matching%20to%20a%20canonical%20query/near/157135024" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ariel Ben-Yehuda <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/moving.20method.20matching.20to.20a.20canonical.20query.html#157135024">(Jan 29 2019 at 20:26)</a>:</h4>
<p>that's what I thought, but it turns out I don't need that</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>